const ApiErrorNames = require('./ApiErrorNames');

class ApiError extends Error{
    constructor(name){
        super();
        let err_msg = ApiErrorNames.getErrorMsg(name);
        this.code = err_msg.code;
        this.message = err_msg.message;
    }
}

module.exports = ApiError;